package com.teemo.dp.singleton.demo5;

/**
 * @author Teemo
 */
public class Washer {
    private Washer() {
        System.out.println("Washer init");
    }

    private static Washer washer;

    public static Washer getInstance() {
        if (null == washer) {
            synchronized (Washer.class) {
                if (null == washer) {
                    washer = new Washer();
                }
            }
        }
        return washer;
    }
}
